<?php
include_once("core/normal.php");

/**
 * Groups
 *
 * @copyright inovia
 * @package oolime_core   
 */
class Groups extends Normal {

  
  /**
   * Add the groups available in xml response dom node
   *
   */        
  public function getGroups(){
    $groupsNode = $this->response->doc->createElement("groups");

    $groupNode  = $this->response->doc->createElement("group");
    $groupValue = $this->response->doc->createTextNode('');
    $groupNode->appendChild($groupValue);
    $groupsNode->appendChild($groupNode);

    include("rights.php");
    foreach($grps as $g => $l){
      $groupNode  = $this->response->doc->createElement("group");
      $groupValue = $this->response->doc->createTextNode(utf8_encode($g));
      $groupNode->appendChild($groupValue);
      $groupsNode->appendChild($groupNode);
    }
	  $this->response->root->appendChild($groupsNode);
  }
  
  public function getArrayGroups(){
    include("rights.php");
    $arrayGroup=Array();
    foreach($grps as $g => $l){
      $arrayGroup[]=$g;
    }
    return $arrayGroup;
  }
  
}


?>
